package com.chixing.config;


import com.chixing.util.MongodbUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

import javax.annotation.PostConstruct;

@Configuration
public class MongodbConfig {

    @Autowired
    private MongoTemplate mongoTemplate;

    @PostConstruct
    public void init() {
        MongodbUtils.config(mongoTemplate);
    }
}
